package com.dream.netty.nettyclientweb;

import com.dream.netty.nettyclientweb.netty.NettyClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class TestController {

    @Autowired
    private NettyClient nettyClient ;

    @GetMapping(path = "/send/{params}")
    public String test(@PathVariable("params") String message){
        nettyClient.sendMessage(message);
        return "success";
    }
}
